package com.beeantec.jnrerc.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author anthony
 * @since 2021-12-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("comment")
public class Comment extends Model<Comment> {

    private static final long serialVersionUID = 1L;

    /**
     * 评论ID
     */
    @TableId(value = "comment_id", type = IdType.AUTO)
    private Long commentId;

    /**
     * 被评论内容唯一ID
     */
    private String answerId;

    /**
     * 被评论内容类型，默认news新闻:0
     */
    private Integer answerType;

    /**
     * 被评论内容名
     */
    private String answerName;

    /**
     * 用户id
     */
    private Integer memberId;

    /**
     * 评论内容
     */
    private String content;

    /**
     * 状态:0，待审核 1，通过 2，不通过
     */
    private Integer state;

    /**
     * 被点赞数
     */
    private Integer praiseCount;

    /**
     * 被评论数
     */
    private Integer answerCount;

    /**
     * 评论时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 审核时间
     */
    private Date reviewTime;

    /**
     * 逻辑删除 0删除 1未删除
     */
    private Integer deleted;

    /**
     * 审核创建人id
     */
    private Integer createBy;

    /**
     * 审核更新人id
     */
    private Integer updateBy;

    /**
     * 评论等级
     */
    private Integer level;



    /**
     * 1匿名0不匿名
     */
    private Integer hide;

    /**
     * 腾讯机审结果 0：Review疑似 1：Pass通过 2：Block拒绝
     */
    private Integer autoReviewResult;

    /**
     * 腾讯机审id  请求的requestId
     */
    private String autoReviewId;

    /**
     * 第一级评论id 
     */
    private Long firstLevelId;

    /**
     * 父评论id
     */
    private Long parentId;

    /**
     * 是否官方回复 0 否 1 是
     */
    private Integer officialReply;

    /**
     * 是否作者点赞 0 否 1 是
     */
    private Integer authorPraise;


    public static final String COMMENT_ID = "comment_id";

    public static final String ANSWER_ID = "answer_id";

    public static final String ANSWER_TYPE = "answer_type";

    public static final String ANSWER_NAME = "answer_name";

    public static final String MEMBER_ID = "member_id";

    public static final String CONTENT = "content";

    public static final String STATE = "state";

    public static final String PRAISE_COUNT = "praise_count";

    public static final String ANSWER_COUNT = "answer_count";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String REVIEW_TIME = "review_time";

    public static final String DELETED = "deleted";

    public static final String CREATE_BY = "create_by";

    public static final String UPDATE_BY = "update_by";

    public static final String LEVEL = "level";

    public static final String AUTO_REVIEW_RESULT = "auto_review_result";

    public static final String AUTO_REVIEW_ID = "auto_review_id";

    public static final String FIRST_LEVEL_ID = "first_level_id";

    public static final String PARENT_ID = "parent_id";

    public static final String OFFICIAL_REPLY = "official_reply";

    public static final String AUTHOR_PRAISE = "author_praise";

    public static final String HIDE = "hide";

    @Override
    protected Serializable pkVal() {
        return this.commentId;
    }

}
